package com.topisv.tms.entity.qimen;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import com.topisv.tms.entity.IdEntity;

/**
 * 发货单任务表
 *  Date          Author       Version       Description
 * ----------------------------------------------------------
 *  2015-5-8      CC            1.0           Create
 */
@Entity
@Table(name = "QM_RESEND_INFO")
public class QmResendInfo extends IdEntity {
	public QmResendInfo(){};
	public QmResendInfo(String sendContent){
		String ip = "";
		try {
			ip = InetAddress.getLocalHost().getHostAddress();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
		this.sendContent = sendContent;
		this.dealIp = ip;
		this.createTime = new Date();
		this.resendCount = 0;
		this.resendTime = null;
		this.sendResult = "new";
		this.lockTask = "unlock";
	}
	private static final long serialVersionUID = 1L;
	
	private String method;
	private String format;
	private String appKey;
	private String v;
	private String signMethod;
	private String customerId;
	private String secret;
	
	private String sendContent;// 重发内容
	private String dealIp;// 重发节点
	private Date createTime;//创建时间
	private Date resendTime;//重发时间
	private int resendCount;//重发次数
	private String sendResult;//重试结果{ 重发成功:do ,重发中:undo,新建任务:new}
	private String lockTask;//多实例部署并发 锁定任务(lock：已锁定 ：nolock：未锁定)
	
	public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}
	public String getFormat() {
		return format;
	}
	public void setFormat(String format) {
		this.format = format;
	}
	public String getAppKey() {
		return appKey;
	}
	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}
	public String getV() {
		return v;
	}
	public void setV(String v) {
		this.v = v;
	}
	public String getSignMethod() {
		return signMethod;
	}
	public void setSignMethod(String signMethod) {
		this.signMethod = signMethod;
	}
	public String getCustomerId() {
		return customerId;
	}
	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}
	public String getSendContent() {
		return sendContent;
	}
	public void setSendContent(String sendContent) {
		this.sendContent = sendContent;
	}
	public String getDealIp() {
		return dealIp;
	}
	public void setDealIp(String dealIp) {
		this.dealIp = dealIp;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getResendTime() {
		return resendTime;
	}
	public void setResendTime(Date resendTime) {
		this.resendTime = resendTime;
	}
	public int getResendCount() {
		return resendCount;
	}
	public void setResendCount(int resendCount) {
		this.resendCount = resendCount;
	}
	public String getSendResult() {
		return sendResult;
	}
	public void setSendResult(String sendResult) {
		this.sendResult = sendResult;
	}
	public String getLockTask() {
		return lockTask;
	}
	public void setLockTask(String lockTask) {
		this.lockTask = lockTask;
	}
	public String getSecret() {
		return secret;
	}
	public void setSecret(String secret) {
		this.secret = secret;
	}
	

}
